package com.atguigu.spring5.aopanno;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Aspect
@Order(1)   // 增强类优先级，数值越小优先级越高
public class PersonProxy {

    // 前置通知
    @Before(value = "execution(* com.atguigu.spring5.aopanno.User.*(..))")
    public void before() {
        System.out.println("Person Before......");
    }
}
